import request from '@/utils/request'

/**
 * 获取组织架架构
 */

export function getDepartment(){
    return  request({
        url:'/company/department'
    })
}

/**
 * 获取部门负责人的数据
 */

export function getManagerList(){
    return request({
        url:'/sys/user/simple'
    })
}

/**
 * 获取部门详情
 */

export function getDepartmentDetail(id){
    return request({
        url:`/company/department/${id}`,
    })
}

/**
 * 更新部门
 */

export function updateDepartmentDetail(data){
    return request({
        method:'put',
        url:`/company/department/${data.id}`,
    })
}

/**
 * 新增部门
 */

export function addDepartment(data){
    return request({
        method:'post',
        url:`/company/department`,
        data
    })
}
